Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix Windows keyboard shorcuts #20

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

fix Windows keyboard shorcuts #20

wants to merge 2 commits into from

Conversation

fedorg
Copy link

@fedorg fedorg commented Jun 19, 2019

Add ctrl+e and ctrl+del keyboard shortcuts.
Win modifier is not bound to Meta anymore, as it is heavily used by the Windows OS.
Also removed dependency on keyboard layout.

@ericsoderberghp
Copy link
Contributor

I'm all in favor of finding workable command shortcuts. Unfortunately, I don't think these changes will work for Macs as Ctrl-E and Ctrl-Delete already have other behaviors bound to them in OSX. Ctrl-E jumps the insert caret to the end of the current line. Ctrl-Delete deletes the currently selected text.

I'm suspecting we need a bit more research on good approaches to keyboard shortcuts in web apps.

@fedorg
Copy link
Author

fedorg commented Jun 19, 2019

I have left the original bindings to Meta keys intact. The code is if (event.metaKey || event.ctrlKey) so that Meta+e continues to work on Unix only and you won't have to press Ctrl+e
Edit : oh ok I feel dumb, you have probably meant this code would swallow the original text editing features, I agree.

@ericsoderberghp
Copy link
Contributor

But pressing Ctrl-E on OSX will behave incorrectly with this change. It should not toggle the edit/preview mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants